#include "mainwindow.h"

#include <QApplication>
#include <QVBoxLayout>
#include <QPushButton>

#include <QHBoxLayout>
#include <QTableWidget>
#include <QLabel>
#include <QPushButton>
#include <QComboBox>


int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
   // MainWindow w;
    //w.show();
QWidget w;

QPushButton*      btn1 = new QPushButton;
QPushButton*      btn2 = new QPushButton;

    QHBoxLayout*  mainLayout = new QHBoxLayout;
QVBoxLayout*  leftLayout = new QVBoxLayout;
QVBoxLayout*  rightLayout = new QVBoxLayout;
mainLayout->addLayout(leftLayout);
mainLayout->addLayout(rightLayout);
leftLayout->addWidget(btn1);

QHBoxLayout*  s2Layout = new QHBoxLayout;
QPushButton*      btn3 = new QPushButton("1");
QPushButton*      btn4 = new QPushButton("2");
QPushButton*      btn5 = new QPushButton;
QPushButton*      btn6 = new QPushButton;
QPushButton*      btn7 = new QPushButton;
s2Layout->addWidget(btn3);
s2Layout->addWidget(btn4);
s2Layout->addWidget(btn5);
s2Layout->addWidget(btn6);
s2Layout->addWidget(btn7);
rightLayout->addLayout(s2Layout);


QHBoxLayout*  s3Layout = new QHBoxLayout;

QLabel* mlabel1 = new QLabel();
QLabel* mlabel2 = new QLabel();
s3Layout->addWidget(mlabel1);
s3Layout->addWidget(mlabel2);
rightLayout->addLayout(s3Layout);



{
QHBoxLayout*  s4Layout = new QHBoxLayout;

QPushButton*      btn6 = new QPushButton;
QComboBox*  xx =new QComboBox;
QPushButton*      btn7 = new QPushButton;
s4Layout->addWidget(btn6);
s4Layout->addWidget(xx);
s4Layout->addWidget(btn7);
rightLayout->addLayout(s4Layout);
}

{

QHBoxLayout*  s5Layout = new QHBoxLayout;
QPushButton*      btn31 = new QPushButton;
QLabel* mlabel1 = new QLabel("dfdf");
QPushButton*      btn32 = new QPushButton;
QPushButton*      btn33 = new QPushButton;
QPushButton*      btn34 = new QPushButton;
s5Layout->addWidget(btn31);
s5Layout->addWidget(mlabel1);
s5Layout->addWidget(btn32);
s5Layout->addWidget(btn33);
s5Layout->addWidget(btn34);
rightLayout->addLayout(s5Layout);
}

{

QHBoxLayout*  s6Layout = new QHBoxLayout;

QLabel* mlabel1 = new QLabel("dfdf");


s6Layout->addWidget(mlabel1);

rightLayout->addLayout(s6Layout);
}


{

QHBoxLayout*  s7Layout = new QHBoxLayout;

QLabel* mlabel1 = new QLabel("dfdf");
s7Layout->addWidget(mlabel1);
QComboBox*  xx =new QComboBox;
s7Layout->addWidget(xx);

QLabel* mlabel2 = new QLabel("dfdf");
s7Layout->addWidget(mlabel2);
QComboBox*  xx1 =new QComboBox;
s7Layout->addWidget(xx1);
rightLayout->addLayout(s7Layout);
}

{

QHBoxLayout*  s8Layout = new QHBoxLayout;

QLabel* mlabel1 = new QLabel("dfdf");
s8Layout->addWidget(mlabel1);
QComboBox*  xx =new QComboBox;
s8Layout->addWidget(xx);

QLabel* mlabel2 = new QLabel("dfdf");
s8Layout->addWidget(mlabel2);
QComboBox*  xx1 =new QComboBox;
s8Layout->addWidget(xx1);
rightLayout->addLayout(s8Layout);
}

{

QHBoxLayout*  s8Layout = new QHBoxLayout;

QLabel* mlabel1 = new QLabel("dfdf");
s8Layout->addWidget(mlabel1);
QComboBox*  xx =new QComboBox;
s8Layout->addWidget(xx);


rightLayout->addLayout(s8Layout);
}

{

QHBoxLayout*  s8Layout = new QHBoxLayout;

QLabel* mlabel1 = new QLabel("dfdf");
s8Layout->addWidget(mlabel1);
QComboBox*  xx =new QComboBox;
s8Layout->addWidget(xx);

QLabel* mlabel2 = new QLabel("dfdf");
s8Layout->addWidget(mlabel2);
QComboBox*  xx1 =new QComboBox;
s8Layout->addWidget(xx1);
rightLayout->addLayout(s8Layout);
}

{


}

mainLayout->setStretchFactor(leftLayout, 6);
mainLayout->setStretchFactor(rightLayout, 2);
//        QPushButton*      btn = new QPushButton;

//        QTableWidget*     tableWidget = new QTableWidget;

//        QHBoxLayout*     h_layout = new QHBoxLayout;

//        mainLayout->addWidget(btn);

//        mainLayout->addWidget(tableWidget);

//        mainLayout->addLayout(h_layout);

//       mainLayout->setStretchFactor(btn, 1);
//       mainLayout->setStretchFactor(tableWidget, 2);
//       mainLayout->setStretchFactor(h_layout, 2);
    w.setLayout(mainLayout);
    w.show();
    return a.exec();
}
